1. Field of the Invention
The present invention relates to a data recording apparatus to perform data recording utilizing a flash memory and a control method of the data recording apparatus.
2. Description of the Related Art
Conventionally, a video camera to record a moving image and audio data on a recording medium has been known. Further, in recent years, a video camera to record such moving image and audio data into a large capacity flash memory or a memory card including a flash memory has appeared.
In a flash memory, data writing/reading is performed by a unit called a “block”. In some cases, a defect block in which normal data writing cannot be performed occurs due to some problem during its manufacturing process or a posteriori cause. Accordingly, a part of the memory is prepared as an alternative block for such defect block, and data to be recorded in the defect block is written in this alternative block (for example, Japanese Patent Laid-Open No. 2002-109895).
Further, when the alternative block has been used up, during data writing, when data writing cannot be normally performed and a writing error occurs, retry processing to perform address rearrangement in a general recording area including this defect block to write data is also studied.
When retry processing is performed as above during moving image data recording, data writing cannot be performed during the retry processing. Accordingly, the moving image data to be recorded must be stored in a buffer memory or the like before the retry processing is complete.
However, when the data rate of the moving image data is high or when it takes a long time to perform the retry processing, the moving image data overflows the buffer memory since the retry processing cannot be performed in time, and normal recording cannot be performed. To avoid this problem, a large capacity buffer memory is required. However, in a consumer video camera or the like, it is undesirable to prepare such a large capacity buffer memory in consideration of cost, device size and the like. As a result, there is a problem that moving image recording cannot be performed in the above case.